import { type ITableColumnsItem } from '@/components/ProTable';
import { type PropType, type ExtractPropTypes } from 'vue';

export const proTableColumnConfigProps = Object.assign({}, {
  width: {
    type: Number,
    default: 220,
  },
  cache: {
    type: String,
    default: '', // 缓存key 为空则不缓存
  },
  modelValue: {
    type: Array as PropType<ITableColumnsItem<any>[]>,
    default: () => [],
  },
} as const);

export type ProTableColumnConfigProps = ExtractPropTypes<typeof proTableColumnConfigProps>;
